// This file was automatically generated from class.soy.
// Please don't edit this file by hand.


var soy = require('rdoc/templates/soy').soy;


exports.toClassDoc = function(opt_data, opt_sb) {
  var output = opt_sb || new soy.StringBuilder();
  output.append('<html><head><title>', opt_data.typeName, ' - ', opt_data.title, ' Documentation</title><link href="styles/common.css" rel="stylesheet" type="text/css" /><link href="styles/class.css" rel="stylesheet" type="text/css" /></head><body><h1 class="class-header">', opt_data.title, ': <span class="', opt_data.cssKind, '">', opt_data.typeName, '</span></h1>', (opt_data.baseClass) ? '<div class="extends">extends ' + opt_data.baseClass + '</div>' : '');
  if (opt_data.interfaces.length > 0) {
    output.append('<div class="implements">implements ');
    var interfaceList22 = opt_data.interfaces;
    var interfaceListLen22 = interfaceList22.length;
    for (var interfaceIndex22 = 0; interfaceIndex22 < interfaceListLen22; interfaceIndex22++) {
      var interfaceData22 = interfaceList22[interfaceIndex22];
      output.append(interfaceData22, (! (interfaceIndex22 == interfaceListLen22 - 1)) ? ', ' : '');
    }
    output.append('</div>');
  }
  if (opt_data.extendedInterfaces.length > 0) {
    output.append('<div class="extends">extends ');
    var interfaceList32 = opt_data.extendedInterfaces;
    var interfaceListLen32 = interfaceList32.length;
    for (var interfaceIndex32 = 0; interfaceIndex32 < interfaceListLen32; interfaceIndex32++) {
      var interfaceData32 = interfaceList32[interfaceIndex32];
      output.append(interfaceData32, (! (interfaceIndex32 == interfaceListLen32 - 1)) ? ', ' : '');
    }
    output.append('</div>');
  }
  output.append((opt_data.deprecationReason) ? '<h3 class="type-deprecation-header">Deprecated</h3><div class="type-deprecation-reason">' + opt_data.deprecationReason + '</div>' : '', '<div class="class-doc">', opt_data.classDoc, '</div><div class="constructor"><h3 class="const-head">Constructor</h3>');
  var paramList47 = opt_data.constrParams;
  var paramListLen47 = paramList47.length;
  if (paramListLen47 > 0) {
    for (var paramIndex47 = 0; paramIndex47 < paramListLen47; paramIndex47++) {
      var paramData47 = paramList47[paramIndex47];
      output.append('<div class="mono param"><div class="param-head"><span class="param-name">', paramData47.name, '</span> : ', paramData47.type, '</div><div class="param-desc">', paramData47.desc, '</div></div>');
    }
  } else {
    output.append('<div class="no-params">No parameters</div>');
  }
  output.append('</div>');
  exports.memberList(opt_data, output);
  if (opt_data.cssKind == 'class' && opt_data.inheritedMembers.length > 0) {
    var superTypeList68 = opt_data.inheritedMembers;
    var superTypeListLen68 = superTypeList68.length;
    for (var superTypeIndex68 = 0; superTypeIndex68 < superTypeListLen68; superTypeIndex68++) {
      var superTypeData68 = superTypeList68[superTypeIndex68];
      output.append('<div class="inherits"><span class="mono inherits-from">Inherited from ', superTypeData68.from, '</span>');
      exports.memberList(superTypeData68, output);
    }
    var superTypeList74 = opt_data.inheritedMembers;
    var superTypeListLen74 = superTypeList74.length;
    for (var superTypeIndex74 = 0; superTypeIndex74 < superTypeListLen74; superTypeIndex74++) {
      var superTypeData74 = superTypeList74[superTypeIndex74];
      output.append('</div>');
    }
  } else if (opt_data.cssKind == 'interface' && opt_data.inheritedMembers.length > 0) {
    var superTypeList78 = opt_data.inheritedMembers;
    var superTypeListLen78 = superTypeList78.length;
    for (var superTypeIndex78 = 0; superTypeIndex78 < superTypeListLen78; superTypeIndex78++) {
      var superTypeData78 = superTypeList78[superTypeIndex78];
      output.append('<div class="inherits"><div class="mono inherits-from">Required by ', superTypeData78.from, '</div>');
      exports.memberList(superTypeData78, output);
      output.append('</div>');
    }
  }
  output.append((opt_data.rev) ? '<hr class="footer" /><div class="rev">revision: ' + opt_data.rev + '</div>' : '', '</body></html>');
  return opt_sb ? '' : output.toString();
};


exports.memberList = function(opt_data, opt_sb) {
  var output = opt_sb || new soy.StringBuilder();
  output.append('<div class="public-props"><h3 class="props-head">Public Properties</h3>');
  exports.propList({props: opt_data.publicProps}, output);
  output.append('<h3 class="methods-head">Public Methods</h3>');
  exports.methodList({methods: opt_data.publicMethods, isInterface: opt_data.cssKind == 'interface' ? true : false}, output);
  output.append('</div><div class="protected-props"><h3 class="props-head">Protected Properties</h3>');
  exports.propList({props: opt_data.protectedProps}, output);
  output.append('<h3 class="methods-head">Protected Methods</h3>');
  exports.methodList({methods: opt_data.protectedMethods, isInterface: opt_data.cssKind == 'interface' ? true : false}, output);
  output.append('</div><div class="private-props"><h3 class="props-head">Private Properties</h3>');
  exports.propList({props: opt_data.privateProps}, output);
  output.append('<h3 class="methods-head">Private Methods</h3>');
  exports.methodList({methods: opt_data.privateMethods, isInterface: opt_data.cssKind == 'interface' ? true : false}, output);
  output.append('</div>');
  return opt_sb ? '' : output.toString();
};


exports.propList = function(opt_data, opt_sb) {
  var output = opt_sb || new soy.StringBuilder();
  var propList115 = opt_data.props;
  var propListLen115 = propList115.length;
  if (propListLen115 > 0) {
    for (var propIndex115 = 0; propIndex115 < propListLen115; propIndex115++) {
      var propData115 = propList115[propIndex115];
      output.append('<div class="mono prop"><div class="prop-head"><span class="prop-name"><a name="', propData115.name, '">', propData115.name, '</a></span> : ', propData115.type, '</div><div class="prop-desc">', (propData115.desc) ? propData115.desc : '<em>No description.</em>', '</div></div>');
    }
  } else {
    output.append('<div class="no-props">None.</div>');
  }
  return opt_sb ? '' : output.toString();
};


exports.methodList = function(opt_data, opt_sb) {
  var output = opt_sb || new soy.StringBuilder();
  var methodList133 = opt_data.methods;
  var methodListLen133 = methodList133.length;
  if (methodListLen133 > 0) {
    for (var methodIndex133 = 0; methodIndex133 < methodListLen133; methodIndex133++) {
      var methodData133 = methodList133[methodIndex133];
      output.append('<div class="mono prop"><div class="prop-head">', (methodData133.isOverride) ? '<em>@override</em> ' : '', (methodData133.isAbstractMethod || opt_data.isInterface) ? '<em>abstract</em> ' : '', '<span class="prop-name"><a name="', methodData133.name, '"', (methodData133.deprecationReason) ? 'class="deprecated"' : '', '>', methodData133.name, '</a></span>', (methodData133.returns && methodData133.returns.type) ? ' &#8658; ' + methodData133.returns.type : '', '</div>', (methodData133.deprecationReason) ? '<div class="deprecation-reason"><strong>Deprecated:</strong> ' + methodData133.deprecationReason + '</div>' : '', '<div class="prop-desc">', (methodData133.desc) ? methodData133.desc : '<em>No description.</em>', '</div><div class="method-params">');
      if (methodData133.params && methodData133.params.length > 0) {
        output.append('<em><strong>Method Parameters</strong></em>');
        var paramList170 = methodData133.params;
        var paramListLen170 = paramList170.length;
        for (var paramIndex170 = 0; paramIndex170 < paramListLen170; paramIndex170++) {
          var paramData170 = paramList170[paramIndex170];
          output.append('<div class="mono prop"><div class="prop-head"><span class="prop-name"><a name="', paramData170.name, '">', paramData170.name, '</a></span> : ', paramData170.type, '</div><div class="prop-desc">', (paramData170.desc) ? paramData170.desc : '<em>No description.</em>', '</div></div>');
        }
      } else {
        output.append('<em>No method parameters.</em>');
      }
      output.append((methodData133.returns) ? '<div class="mono prop"><div class="prop-head"><span class="prop-name"><em>returns</em></span> &#8658; ' + methodData133.returns.type + '</div><div class="prop-desc">' + ((methodData133.returns.desc) ? methodData133.returns.desc : '<em>No description.</em>') + '</div></div>' : '', '</div></div>');
    }
  } else {
    output.append('<div class="no-props">None.</div>');
  }
  return opt_sb ? '' : output.toString();
};


exports.test = function(opt_data, opt_sb) {
  var output = opt_sb || new soy.StringBuilder();
  output.append('Success.');
  return opt_sb ? '' : output.toString();
};
